﻿using System;
using System.Collections.Generic;
 
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class APP_Controls_Personal_Header : System.Web.UI.UserControl
{
    protected int m = ReadRequest.RequestInt("m");
    protected int n = ReadRequest.RequestInt("n");
    protected int p = ReadRequest.RequestInt("p");
    protected Model.UsersAccount user_account = null;
    protected Model.CMember CMember = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        Bind();

    }
    private void Bind()
    {
        CMember = BLL.CMember.UserLoginInfo();
        if (CMember != null && CMember.Id > 0)
        {
            user_account = BLL.UsersAccount.GetModelByuser_id(CMember.Id); 
            if (user_account == null)
            {
                BLL.Session.Remove(BLL.CMember.LoginUserSessionKey);
                Response.Redirect("/Default.aspx");
            }
        }
        else
        {
            Response.Redirect("/Default.aspx");
        }
    }
}